package com.foreknow.elmboot.mapper;

import com.foreknow.elmboot.po.Cart;
import com.foreknow.elmboot.po.OrderDetailet;
import com.foreknow.elmboot.po.Order;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OrderDetailetMapper {
    @Select({"select * from orderdetailet where orderId=#{orderId}"})
    public List<OrderDetailet> getOrderDetailetByOrderId(Integer orderId);

    @Insert({"insert into orderdetailet(orderId,foodId,quantity)" +
            "values(#{orderId},#{foodId},#{quantity})"})
    public int CreateOrderDetailet(OrderDetailet orderDetailet);
}
